package com.quanxiaoha.xiaohashu.oss.api;


import com.quanxiaoha.framework.common.response.Response;
import com.quanxiaoha.xiaohashu.oss.config.FeignFormConfig;
import com.quanxiaoha.xiaohashu.oss.constant.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: jingyan_liu
 * @CreateTime: 2025-07-22
 * @Description:
 * @Version: 1.0
 */


@FeignClient(name = ApiConstants.SERVICE_NAME, configuration = FeignFormConfig.class)
public interface FileFeignApi {
	
	String PREFIX = "/file";
	
	@PostMapping(value = PREFIX + "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
	Response<?> uploadFile(@RequestPart(value = "file") MultipartFile file);
}